# +----------------------------------------------------------------------
# | Pink [ A modern python web framework ]
# +----------------------------------------------------------------------
# | Copyright (c) 2023 http:#unnnnn.com All rights reserved.
# +----------------------------------------------------------------------
# | Author: chenjianhua <unnnnn@foxmail.com>
# +----------------------------------------------------------------------

from .. import RateLimiter
from ...providers import Provider


class RateProvider(Provider):
    def __init__(self, application):
        self.application = application

    def register(self):
        rate_limiter = RateLimiter(self.application)
        self.application.bind("rate", rate_limiter)

    def boot(self):
        pass
